import 'package:dio/dio.dart';
import 'package:retrofit/dio.dart';
import 'package:retrofit/error_logger.dart';
import 'package:retrofit/http.dart';

import '../api_client.dart';

part 'api_chat_asyn.g.dart';

@RestApi(baseUrl: "https://fc.hongfund.com:8503/")
abstract class ApiChatAsynClient {
  factory ApiChatAsynClient(Dio dio, {String baseUrl}) = _ApiChatAsynClient;

  static late ApiChatAsynClient instance;

  static void initialize(Dio dio) {
    instance = ApiChatAsynClient(dio);
  }


  //{
  //  "aiType": 1,
  //  "phone": "12312312312",
  //  "sessionId": "12312312312_1",
  //  "content": "你是谁",
  //  "fileId": "askdhkajshfjahsf,aslkflaksfjklasjfkas,asdlkasjlkfjakljfa",
  //  "partyId": "60074",
  //  "bookName": "A公司"
  // }
  @POST("chat")
  Future<String> chatSend(@Body()  Map<String,dynamic> body);



  @POST("chat")
  @DioResponseType(ResponseType.stream)
  Future<ResponseBody> chatSendStreamResponse(@Body() Map<String,dynamic> body);

}
